<?php
/**
 * Created by PhpStorm.
 * User: lijunjun
 * Date: 2018/1/21
 * Time: 上午2:25
 */

namespace Api\Controller;

use Think\Controller;


class BaseController extends Controller {

    /**
     * BaseController constructor.
     */
    public function __construct ()
    {
        parent::__construct();
    }

    public function index ()
    {

    }

    /**
     * @param mixed  $data
     * @param string $type
     */
    protected function ajaxReturn ($data, $type = '')
    {
        // todo tp框架查出来的类型全是string 与 数据库中定义的字段类型不一致。后续需要调整
        // parent::ajaxReturn($data, 'json', JSON_NUMERIC_CHECK); // TODO: Change the autogenerated stub
        parent::ajaxReturn($data, 'json', 0); // TODO: Change the autogenerated stub
    }
}